<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo ($meta_title); ?>_<?php echo C('WEB_SITE_TITLE');?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />

<!-- Set render engine for 360 browser -->
<meta name="renderer" content="webkit" />

<!-- No Baidu Siteapp-->
<meta http-equiv="Cache-Control" content="no-siteapp"/>

<link rel="shortcut icon" href="/Public/static/exstatics/images/favicon.ico" type="image/x-icon" />
<link href="/Public/static/exstatics/bootstrap/css/bootstrap3.3.min.css" rel="stylesheet" />
<link href="/Public/static/exstatics/font-awesome/4.2.0/css/font-awesome.min.css"  rel="stylesheet" type="text/css" />
<link href="/Public/static/exstatics/tea.css" rel="stylesheet" />
<!--[if IE 7]>
	<link rel="stylesheet" href="/Public/static/exstatics/font-awesome/4.2.0/css/font-awesome-ie7.min.css">
<![endif]-->
<!-- HTML5 shim for IE8 support of HTML5 elements -->
<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
	<script src="/Public/static/exstatics/bootstrap/js/respond.min.js" ></script>
<![endif]-->
	<script type="text/javascript" src="/Public/static/exstatics/bootstrap/js/jq.min.js" ></script>
	<script type="text/javascript" src="/Public/static/exstatics/bootstrap/js/bootstrap3.3.min.js" ></script>
	<script type="text/javascript" src="/Public/static/exstatics/angular/angular.min.js" ></script>
	<script type="text/javascript" src="/Public/static/exstatics/angular/myApp.js" ></script>


</head>

<body>
	
	<!-- 顶部登录条 loginbar -->
	<div class="container-fluid loginbar">
		<div class="container">
			<div class="loginbar-info userInfo">
				<?php if(is_login()): ?><div class="dropdown">
					<div id="dLabel" class="fl">欢迎您<a role="button"  data-taget="#" data-toggle="dropdown" href="">&nbsp;&nbsp; <b><?php echo get_username();?>&nbsp;<span class="fa fa-caret-down"></span></b></a></div>
					<span class="sep">|</span>
					<ul class="dropdown-menu userToggle" role="menu" aria-labelledby="dLabel">
					<img style="position:absolute;top:-7px;left:75px;index:1100;" src="http://c1.mifile.cn/f/i/2014/cn/icon/user-menu-arrow.png" />
						 <li><a rel="nofollow" href="index.php?s=/Home/center/index.html">个人中心</a></li>
						 <li><a rel="nofollow" href="index.php?s=/Home/center/collect.html">我的收藏</a></li>
						 <li><a rel="nofollow" href="index.php?s=/Home/center/coupon.html">优惠券</a></li>
						 <li><a rel="nofollow" href="index.php?s=/Home/center/comment.html">我的评论</a></li>
						 <li><a rel="nofollow" href="index.php?s=/Home/User/logout.html">退出</a></li>
				    </ul>
				<a href="index.php?s=/Home/center/allorder.html">我的订单</a>
				</div>
				<?php else: ?>
				<a href="<?php echo U('User/login');?>">登录</a>
				<span class="sep">|</span>
				<a href="<?php echo U('User/register');?>">注册</a><?php endif; ?>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$('#dLabel,.userToggle').hover(function(){
				$('.userToggle').css('display','block');
				},function(){
				$('.userToggle').css('display','none');
				});
	</script>
	<!-- 顶部登录条 loginbar end-->
	

	
	<!-- 主体内容 site-body -->
	
		
				<!--导航条-->
		<div class="container site-header">
			<div class="row">
				<a href="/"><i class="fa fa-home fa-4x col-md-2"></i></a>
				<form  class="col-md-8" role="form" action="<?php echo U('User/login');?>" method="post">
					<div class="form-group site-search fr">
						<input type="text" class="form-control site-search-input fl" name="seach" placeholder="输入关键词搜索"/>
						<span style="border-left:1px solid rgb(230,230,230);margin-left:0px;height:43px;" class="sep fl"></span>
						<button type="submit" class="fa fa-search site-search-btn fl" ></button>
					</div>
				</form>
				<div class="col-md-2">
					<div class="site-shopCart"><i class="fa fa-shopping-cart"></i>&nbsp;&nbsp;购物车</div>
				</div>
			</div>
		</div>
		<br />
		<div class="container site-nav">
			<div class="row">
				<div class="site-category col-md-2">
					<li class="h4Title">全部商品分类</li>
					<div class="category-menu mborder hide">
						<?php if(is_array($categoryq)): $i = 0; $__LIST__ = array_slice($categoryq,0,7,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="category-li" >
							<li class="h5Title"><?php echo ($vo["title"]); ?></li>
							<?php if(is_array($vo["child"])): $i = 0; $__LIST__ = array_slice($vo["child"],0,3,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$sub): $mod = ($i % 2 );++$i;?><li class="fl"><?php echo ($sub["title"]); ?>&nbsp;&nbsp;</li><?php endforeach; endif; else: echo "" ;endif; ?>
						</div><?php endforeach; endif; else: echo "" ;endif; ?>
					</div>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			$(".site-category").hover(function(){
					$('.category-menu').removeClass('hide');
					},function(){
					$('.category-menu').addClass('hide');
					});
		</script>
		<!--导航条 end -->

		

		
		<div class="container" ng-app="">
			<div class="col-md-12 main-nav h4Title nopadding">
				<a rel="nofollow" href="<?php echo C('DOMAIN');?>"><i class="fa fa-home"></i>&nbsp;&nbsp;首页</a>&gt;<?php echo (get_location_name($info["category_id"])); ?>&gt;<a class="h5Title"href="<?php echo U('Article/detail?id='.$info['id']);?>"><?php echo ($info["title"]); ?></a>
			</div>

			<div class="col-md-10 goods-detail">
			<div class="row">
				<div class="col-md-6 goods-detail-img nopadding">
					<div class="jqzoom col-md-12 text-center" id="spec-n1" >
						<img  class="mborder col-md-10 col-md-offset-1" height="370" src={{jqimg}} ng-init='jqimg="<?php echo (get_cover($info["cover_id"],'path')); ?>"' >
					</div>
					<div class="col-md-12" style="height:20px;"></div>
					<div class="col-md-12">
								<div class="control col-md-1" id="spec-left">
									<img src="/Public/Home/images/btn_mobile_prev_cur.jpg" />
								</div>
								<div class="col-md-10 list-h-screen nopadding">
									<ul class="list-h">
									<?php if(!empty($info['pics'])){ $pics= explode(',',$info['pics']);}else{ $pics="";} ?>
								    <li ng-mouseover='jqimg="<?php echo (get_cover($info["cover_id"],'path')); ?>"' class=""><img src="<?php echo (get_cover($info["cover_id"],'path')); ?>" /></li>
									<?php if(!empty($pics)): if(is_array($pics)): $i = 0; $__LIST__ = $pics;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><li ng-mouseover='jqimg="<?php echo (get_cover($v,'path')); ?>"'><img src="<?php echo (get_cover($v,'path')); ?>" data-id="<?php echo ($v); ?>"/> </li><?php endforeach; endif; else: echo "" ;endif; endif; ?> 
									<?php if(empty($pics)): ?><li ng-mouseover="jqimg='/Public/Home/images/2-1.jpg'"><img src="/Public/Home/images/2-1.jpg"> </li>
										<li ng-mouseover="jqimg='/Public/Home/images/2-2.jpg'"><img src="/Public/Home/images/2-2.jpg"> </li>	
										<li ng-mouseover="jqimg='/Public/Home/images/2-3.jpg'"><img src="/Public/Home/images/2-3.jpg"> </li>
										<li ng-mouseover="jqimg='/Public/Home/images/2-4.jpg'"><img src="/Public/Home/images/2-4.jpg"> </li>
										<li ng-mouseover="jqimg='/Public/Home/images/2-3.jpg'"><img src="/Public/Home/images/2-3.jpg"> </li>
										<li ng-mouseover="jqimg='/Public/Home/images/2-4.jpg'"><img src="/Public/Home/images/2-4.jpg"> </li><?php endif; ?>
									</ul>
								</div>
								<div class="control col-md-1" id="spec-right">
									<img src="/Public/Home/images/btn_mobile_next_cur.jpg" />
								</div>
								<script type="text/javascript">
									/* 产品图片左右滑动动画 */
									var liNum=($('.list-h li').size());
									var clickRnum=0;
									$('#spec-right').click(function(){
											if(clickRnum+5<liNum){
												clickRnum=clickRnum+1;
												$('.list-h').animate({left:'-'+76*clickRnum+"px"},function(){
													});	
												}
									});
									$('#spec-left').click(function(){
											if(clickRnum!==0)
											clickRnum=clickRnum-1;
											$('.list-h').animate({left:'-'+76*clickRnum+"px"});	
									});
									/* 产品购买数量增加或减少 */
									function numController($scope){
										$scope.addNum=function(){
											$scope.post.num=parseInt($scope.post.num)+1;
										}
										$scope.cutNum=function(){
											if($scope.post.num>1)
											$scope.post.num=$scope.post.num-1;
											else
												alert('数量最低为1');
										}
									}
								</script>
					</div>
				</div>
				<div class="col-md-6 goods-detail-info">
					<div class="col-md-12 h3Title"><?php echo ($info["title"]); ?></div>
					<div class="col-md-2 h45Title">价格：</div>
					<div class="col-md-10 h35Title">
						￥<?php if(!empty($info['groupprice'])){ $price= explode('、',$info['groupprice']);} else{ $price="";} ?>
						<?php if(!empty($price)): if(is_array($price)): $k = 0; $__LIST__ = array_slice($price,0,1,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($k % 2 );++$k; echo ($v); endforeach; endif; else: echo "" ;endif; endif; ?>
						<?php if(empty($price)): echo ($info['price']); endif; ?>
					</div>
					<div class="col-md-2 h45Title">销量：</div>
					<div class="col-md-10 h45Title"><?php echo ($info["sale"]); ?></div>
                    <?php if(!empty($info['brand'])): ?><div class="col-md-2 h45Title">品牌：</div>
					<div class="col-md-10 h45Title"><?php echo ($info["brand"]); ?></div><?php endif; ?>
					<div class="col-md-2 h45Title">数量：</div>
						<input type="hidden" name="id[]" value="<?php echo ($info["id"]); ?>"/> 
						<input type="hidden" name="price[]" id="inputprice" value="<?php echo ($info["price"]); ?>"/> 
						<input type="hidden" name="sort[]" id="inputsort" value="<?php echo ($info["id"]); ?>"/> 
						<input type="hidden" name="parameters[]" id="inputparameters" /> 
					<div class="col-md-10 h45Title" ng-controller="numController">
						<div class="mborder" style="width:150px;height:40px;">
							<span style="text-align:center;width:25px;float:left;border-right:1px solid rgb(230,230,230);" ng-click="addNum()">+</span>
							<input style="border:0px;width:98px;float:left;height:38px;text-align:center" type="text" ng-model="post.num"  ng-init="post.num=1" name="num[]">
							<span style="text-align:center;width:25px;float:left;border-left:1px solid rgb(230,230,230);" ng-click="cutNum()">-</span> 
						</div>
					</div>
                    <div class="col-md-12" style="height:20px;"></div>
					<?php if(!empty($info['parameters_value'])): ?><div class="col-md-2 h45Title">    <?php echo ($info["parameters"]); ?>： <?php if(!empty($info['parameters_value'])){ $datalist= explode('、',$info['parameters_value']);}else{ $datalist="";} ?>
					</div>
					<div class="col-md-10 h45Title">
						   <?php if(!empty($datalist)): if(is_array($datalist)): $k = 0; $__LIST__ = $datalist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($k % 2 );++$k;?><li class="mDetail-datalist"><a href="#" price="<?php echo ($k); ?>"><?php echo ($v); ?> </a></li><?php endforeach; endif; else: echo "" ;endif; endif; ?>
					</div><?php endif; ?> 
                    <div class="col-md-12" style="height:20px;"></div>
					<notempty name="info['parameters_value']">
                    <div class="mDetail-shop fl">直接购买</div>
                    <div class="mDetail-shop fl"><i class="fa fa-shopping-cart"></i>&nbsp;&nbsp;加入购物车</div>
				</div>
			</div>
			</div>

			<div class="col-md-2">

			</div>
		</div>		
		<script type="text/javascript">
		</script>
		
	<!-- 主体内容 site-body end-->
	
	
	
	<!-- 底部内容 footer-->
		<div class="container text-center">
			<br />
			<br />
			<li><a href="">常见问题</a></li>
			<br />
			<li><a href="">久茗轩茶叶有限公司版权所有-京ICP备10046444-京公网安备1101080212535</a></li>
		</div>
	<!-- 底部内容 footer end-->
		
</body>

</html>